const Router = require('koa-router')

const { list, create, detail, edit, remove } = require('../controller/moment.controller')
const { verifyAuth } = require('../middleware/auth.middleware')

const momentRouter = new Router({ prefix: '/api/moment' });

momentRouter.get('/', list);
momentRouter.get('/:momentId', detail);
momentRouter.post('/', verifyAuth, create);
momentRouter.put('/', verifyAuth, edit);
momentRouter.delete('/:momentId', verifyAuth, remove);

module.exports = momentRouter;